<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:c="http://java.sun.com/jsp/jstl/core">
    <h:head>
        <f:loadBundle basename="person.notification.label_#{logged.loggedIdiom}"  var="label" />
        <f:loadBundle basename="person.notification.message_#{logged.loggedIdiom}" var="message" />
        <link href="/coreApp/faces/resource/css/coreEstiloGeneral.css" rel="stylesheet" type="text/css" media="screen" />
    </h:head>
    <h:body>
        <h:outputText value="#{message.m0}" class="label" rendered="#{!access.visit}"/>
        <h:form id="formPersona" rendered="#{access.visit}">  

            <p:growl id="messages" showDetail="true"/>  
            <div class="messageWrapper">
                <div class="field">
                    <h:outputText value="#{label.field1}" class="label"/>
                    <p:autoComplete id="buscar" styleClass="searchBox" size="23" 
                                    value="#{person_notificationFind.selectedBeans}"
                                    completeMethod="#{person_notificationFind.autoComplete}"
                                    var="p" multiple="true"
                                    itemLabel="#{p.generalBeans.nombre} #{p.generalBeans.apellido}"
                                    itemValue="#{p}"  dir="" effect=""
                                    converter="person_notificationFind"
                                    requiredMessage="#{message.m20}"
                                    >

                        <p:column style="width:20%;text-align:center; padding: 0 !important;">
                            <p:graphicImage value="#{path.perfilPathView}#{p.documentBeans.archivo}" width="60" height="70"/>
                        </p:column>
                        <p:column style="width:80%">
                            <h:panelGroup layout="block" class="acTitle">#{p.generalBeans.nombre} #{p.generalBeans.apellido}</h:panelGroup>
                            <h:panelGroup>#{p.generalBeans.dni}</h:panelGroup>
                        </p:column>
                    </p:autoComplete>
                    <br/>
                </div>
                <div class="field">
                    <h:outputText value="#{label.field2}" class="label"/>
                    <br/> 
                    <h:inputTextarea value="#{person_notification.mensaje}" style="width: 100%;height: 100px;"/>
                </div>
                <h:commandButton value="#{label.button1}" action="../../person/notification/main.xhtml" actionListener="#{person_notification.insert}" 
                                 onclick="parent.$.fancybox.close();
                                         window.location.reload(true);">
                </h:commandButton>
                <h:commandButton value="#{label.button2}" action="../../person/notification/main.xhtml" onclick="parent.$.fancybox.close();"/>
            </div>
        </h:form>
    </h:body>
</html>
